﻿<%@ Page Language="C#"  MasterPageFile="MasterPage.master" AutoEventWireup="true" CodeFile="SearchResult.aspx.cs" Inherits="SearchResult" Title="Untitled Page" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <script language="javascript">
function document.onkeydown()
{
        if(event.keyCode==13)
        {
                document.getElementById("ctl00_ContentPlaceHolder1_btn_Search").click();
                return false; 
        }
}
    </script>
  <div class="searchcondition"><span>站内搜索：</span>
                    <asp:DropDownList ID="ddl_Types" runat="server" DataTextField="TypeName" DataValueField="TypeCode">
                    <asp:ListItem></asp:ListItem>
                    </asp:DropDownList>
                    &nbsp;&nbsp
                    <asp:TextBox ID="TB_Search" runat="server"></asp:TextBox>
                    &nbsp;&nbsp
                    <asp:Button ID="btn_Search" runat="server" Text="搜索" OnClick="btn_Search_Click" />
    </div>
    <div class="searchresult">
    <div class="searchresultleft">搜索结果</div>
    <div class="searchresultright">您搜索的关键字为&nbsp;<asp:Literal runat="server" ID="ltKeyWords"></asp:Literal>
     &nbsp;&nbsp;&nbsp;共搜索到<asp:Literal runat="server" ID="ltResult"></asp:Literal>条结果</div>
    </div>
    <asp:Repeater ID="rplist" runat="server" > 
    <ItemTemplate>
    <div class="searchcontent">
    <div class="resulttitle">
    <div class="resultleft"><a href='Content.aspx?articleID=<%#Eval("ID")%>' target='_blank'><%#BoldString(Eval("Title").ToString())%></a></div>
    <div class="resulttime">发布时间:&nbsp;<%#Eval("CreateTime")%>&nbsp;&nbsp;点击率:&nbsp;<%#Eval("ViewTimes")%></div>
    </div>
    <div class="resultarticle"><%#TrimHtml(Eval("Content").ToString())%>
    </div>
    </div>
    </ItemTemplate>
    </asp:Repeater>
    <div class="buttonlist" id="dvbtn" runat="server">第&nbsp;<asp:Label ID="lbCurPage" runat="server" Text="Label"></asp:Label>&nbsp;页
    <asp:Button Text="前一页" ID="btnPreviousPage"  runat="server" OnClick="btnPreviousPage_Click"/>
    <asp:Button Text="后一页" ID="btnNextPage"  runat="server" OnClick="btnNextPage_Click"/></div>  
</asp:Content>

